
<template>
	<view class="m-t-10 m-b-20 view flex-row align-center justify-between p-l-20">
        <view class="view flex-row align-center">
            <view @click="goto('/pages/wallet/walletManager/index')" class="view flex-row align-center justify-between w104 h30 m-r-10" style="background:#6781FF;border-radius: 15px;">               
				<view class="fz-12 c-fff p-l-10 ">{{Object.keys(defaultWallet).length > 0 ? defaultWallet.name : '未创建钱包'}}</view>
                <view class="w20 h20 bg-fff view align-center justify-center m-r-5" style="border-radius:50%;">
                    <uni-icons type="right" size="12" color="#748FAC"/>
                </view>
            </view>
            <!-- 开启实名后开放
			<image src="/static/img1/tabbar_icon_my_check.png" class="w20 h20"/>-->
        </view>
        <view class="view flex-row align-center">
          <image @click="scanCode" src="/static/img1/front page_icon_scanning_default.png" class="w23 h23 m-r-20"/>
        </view>
    </view>
</template>

<script>
import { mapState } from 'vuex';
export default {
	props: {
		
	},
    computed: {
		...mapState(['defaultWallet']),
	},
	data() {
		return {
		};
	},
	methods: {
        // 扫码
        scanCode() {
            uni.scanCode({
                success:  (res) => {
                    uni.navigateTo({
                        url: `/pages/wallet/transfer/totransfer?address=${res.result}`
                    })
                }
            })
        },
		goto(url) {
            uni.navigateTo({
              url: url
            });
        },
	}
};
</script>

<style lang="scss" scoped>

</style>
